package com.niuwa.p2p.service.channel;

import java.util.Map;

import com.niuwa.p2p.core.mvc.entity.PageBean;
import com.niuwa.p2p.entity.channel.ChannelDetailInfo;
import com.niuwa.p2p.vo.channel.AuditFrom;
import com.niuwa.p2p.vo.channel.ChannelAuditLogVo;
import com.niuwa.p2p.vo.channel.ChannelBasicInfoVo;
import com.niuwa.p2p.vo.channel.ChannelCustomerVo;

public interface IChannelCustomerService {
	
	/**
	 * 分页查询渠道客户集合
	 * 根据paramMap，选取需要的渠道客户集合 
	 * 
	 * @param paramMap 过滤得条件Map
	 * @return PageBean<ChannelCustomerVo> 渠道客户 分页信息集合
	 */
	public PageBean<ChannelCustomerVo> search(Map<String, Object> paramMap);
	
	/**
	 * 提交审核
	 * @param channelCode 业务编号
	 * @param operatorId 操作员ID 
	 * @throws Exception
	 */
	public int updateToAuditChannel(String channelCode, long operatorId) throws Exception;

	/**
	 * 审核
	 * @param channelCode 业务编号
	 * @param auditFrom 渠道审核Form 
	 * @param operatorId 操作员ID
	 * @throws Exception
	 */
	public int updateAuditChannel(String channelCode, AuditFrom auditFrom, long operatorId) throws Exception;
	
	/**
	 * 启用
	 * @param channelCode 业务编号
	 * @param operatorId 操作员ID
	 * @throws Exception
	 */
	public int updateEnableChannel(String channelCode, long operatorId) throws Exception;
	
	/**
	 * 分页查询渠道审核操作集合
	 * 根据paramMap，选取需要的渠道审核操作集合 
	 * 
	 * @param paramMap 过滤得条件Map
	 * @return PageBean<ChannelCustomerVo> 渠道审核操作分页信息集合
	 */
	public PageBean<ChannelAuditLogVo> listAuditOperateRecord(Map<String, Object> paramMap);
	
	
	/*
	 * 创建新的渠道相关信息，
	 * 包括表：Corportaion,ChannelInfo, ShareHolder, CorpShareHolder等
	 */
	public String addNewChannelCustomer (ChannelBasicInfoVo cbiv) throws Exception;

	/*
     * 更新渠道相关信息，
     * 包括表：Corportaion,ChannelInfo, ShareHolder, CorpShareHolder等
     */
	public int updateChannelCustomer (ChannelBasicInfoVo cbiv) throws Exception;
	
	public ChannelDetailInfo getChannelInfo(String channelCode);
	
	/**
	 * 取得渠道基本信息
	 * @param channelCode 业务编号
	 * @return ChannelBasicInfoVo 渠道基本信息
	 */
	public ChannelBasicInfoVo getChannelBasicInfo(String channelCode);
	
	/*
	 * 删除渠道公司Logo
     * @param channelCode 业务编号
     * @return int 返回是否成功
	 */
	public int deleteChannelLogo(String channelCode);
}
